package com.wn.common.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "酒店")
public class Hotel {
    private Integer id;

    //@Pattern(regexp = "^[\\u4e00-\\u9fa5]+$",message ="酒店名称格式错误")
    @NotBlank(message = "请填写酒店名字")
    private String hotelName;

    @NotBlank(message = "请填写酒店所在地")
    private String cityRegionCode;

    @Pattern(regexp = "(^0[0-9]{2,3}-[0-9]{7,8}$)|(^1[345678][0-9]{9}$)",message = "酒店号码格式错误！")
    private String hotelTel;

    @NotBlank(message = "请填写酒店星级")
    @Pattern(regexp = "^[3-5]$",message = "只能评定3、4、5星级")
    private String hotelLevel;

    @NotBlank(message = "请填写酒店描述")
    private String hotelDescription;

    private String hotelImages;

    @ApiModelProperty(hidden = true)
    private String hotelHouseId;

    @ApiModelProperty(hidden = true)
    private Integer hotelResId;

    @ApiModelProperty(hidden = true)
    private Integer createUserId;

    @ApiModelProperty(hidden = true)
    private Integer updateUserId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(hidden = true)
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(hidden = true)
    private Date updateTime;

    @ApiModelProperty(hidden = true)
    private Integer isDeleted;

    @ApiModelProperty(hidden = true)
    private Integer status;//状态

    private Float lng; //经度

    private Float lat; //维度

    @Pattern(regexp = "(^[1-9]\\d*(\\.\\d{1,2})?$)|(^0(\\.\\d{1,2})?$)")
    private String hotelPrice;



}
